package product;

public class TaskConsumer implements Runnable {

    @Override
    public void run() {
        while (true) {
            try {
                Product product = PlayGround.productQueue.poll();
                System.out.println("消费了:" + product);
                Thread.sleep(500);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
